package com.zhentao.feign;

import com.zhentao.apis.producer.ProducerClientApi;
import com.zhentao.dto.UserDto;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Date 2024/3/27 10:09
 * @Author xdm
 **/

@RestController
public class producerClient implements ProducerClientApi {

    @PostMapping("/user/add")
    @Override
    public String add(UserDto userDto) {
        //调用service
        System.out.println("用户添加"+userDto);
        return "用户添加"+userDto;
    }

    @GetMapping("/user/list")
    @Override
    public String list() {
        System.out.println("查询");
        return "查询";
    }
}
